Skip to content

fix: thread moves across a link keep their parent, wake, and refuse honestly - #993

Merged
badcuban merged 3 commits into
mainfrom
fix/move-review-leftovers
Nov 18, 2026
Merged

badcuban merged 3 commits into
mainfrom
fix/move-review-leftovers

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

A blind review of #985 found six bugs in moving threads across a link, all still in main:

  • A child moved back home before the first move was confirmed lost its parent for good.
  • A move waiting on a shared folder never woke after a stopped command.
  • A parent's message could deadlock its child's move.
  • A lone-child move to an older computer retried forever.
  • "Move its whole family" ignored the agent picked for the child.
  • On an unpinned link, the fence trusted the sender's claim about where a thread came from.

Fixes:

  • The returning computer names the thread it moved over from (linkLineage.home.fromThreadId). When that thread is still the parent's child moving alone there, the import adopts it and completes that move in the same decision (adopt.completesMoveOf). A late answer for a thread already back never records it as a remote child.
  • A waiting move rechecks on any event from the threads it waits on.
  • A parent's message to a child whose move is stopping it is refused.
  • checkMoveTarget reads aloneRefusal, so the move ends with "Update Threadlines on X".
  • The dialog hides the agent picker in family mode and says each thread gets the agent that computer suggests.
  • A moved thread records whether its link pinned where it came from (movedFrom.environmentPinned). While fenced, one from an unpinned link moves nowhere until someone sends it a message.

Heads up: a thread that moved before this change and is still fenced has no pinned mark, so it can't move back until someone sends it a message.

Checked: fmt, lint, typecheck, the full server suite, the contracts and guide tests, and the move dialog's browser tests. Not yet: the full web browser suite, a run between two real linked computers, and an independent review.

…onestly

Fixes six review findings left in #985:

- A child that comes back before this computer heard its move landed now
  lands under its parent: the sender names the thread it moved over from
  (linkLineage.home.fromThreadId), and when that thread is still the
  parent's child moving alone to that computer, the import adopts it and
  completes that move in the same decision (adopt.completesMoveOf). A late
  answer for a thread already back never records it as a remote child.
- A move waiting on another thread in its folder looks again on any event
  of the threads it waits on, so an interrupted command run, or a workflow
  or voice chat ending, wakes it.
- A parent's message to a child whose own move is stopping it is refused,
  as for a frozen child, instead of deadlocking the move.
- A lone child's move to a computer that can't keep it its parent's ends
  with that reason (checkMoveTarget reads aloneRefusal) instead of retrying
  forever when the target came back on an older version.
- The move dialog hides the agent picker in "Move its whole family" mode
  and says each thread uses the agent that computer suggests.
- A moved thread records whether its link pinned the computer it came from
  (movedFrom.environmentPinned, taken from the link); while fenced, one
  from an unpinned link moves nowhere.
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 18, 2026 9:38am UTC

Request Review

…ait fixes

- An arriving thread reads the thread it moved over from before its
  parent, and the decider takes `completesMoveOf` when the parent already
  holds it, so an answer that lands mid-arrival never strands the return
  or leaves the parent pointing at the read-only copy there.
- Only a thread that came back over a link that proved its computer stops
  a late answer from recording the parent's child there.
- The move queue notes the last event per thread: a look that read a
  waited-on thread before its event arrived looks again (a restart with the
  shared folder wait already on record emits nothing else).
- A move worker stops waiting on an unreachable computer once the move
  landed another way, and startup removes packed copies of moves already
  recorded as landed.
- A thread coming home completes its child's move only when it is the copy
  that move made there: its id must be the one the transfer gives it there,
  from this computer's device on that computer (linkMoveCopyThreadId). Both
  the arrival and the decider check it, so a linked computer can't name the
  real child and send back another thread.
- A parent on another computer can't queue a message for a child its own
  move is already stopping (thread.remote-request.queue), and is told why.
- A returned thread deleted since still counts as back, so a late answer
  never records the read-only copy there as the parent's child. Any
  return counts again, proven link or not: the pinned-only check brought
  back the original bug for honest returns over older links.
@github-actions github-actions Bot removed the size:L label Nov 18, 2026
@badcuban
badcuban enabled auto-merge November 18, 2026 09:38
@badcuban
badcuban added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 26b7c9c Nov 18, 2026
24 checks passed
@badcuban
badcuban deleted the fix/move-review-leftovers branch November 18, 2026 09:52

This branch was previously deployed

1 inactive deployment
Preview — 0073f6ae Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant